home *** CD-ROM | disk | FTP | other *** search
/ SPACE 2 / SPACE - Library 2 - Volume 1.iso / demos / 11 / general / quest1.rpt < prev    next >
Encoding:
Text File  |  1986-04-17  |  15.8 KB  |  327 lines

  1.          ------------------------------------------------------------
  2.          |                                                          |
  3.          | AAA  TTTTT  AAA  RRRR   III       ****         SSS  TTTTT|
  4.          |A   A   T   A   A R   R   I        ****        S   S   T  |
  5.          |A   A   T   A   A R   R   I        ****        S       T  |
  6.          |AAAAA   T   AAAAA RRRR    I       ******        SSS    T  |
  7.          |A   A   T   A   A R   R   I      ** ** **          S   T  |
  8.          |A   A   T   A   A R   R   I     **  **  **     S   S   T  |
  9.          |A   A   T   A   A R   R  III  **    **    **    SSS    T  |
  10.          |                                                          |
  11.          |DDDD  EEEEE V   V EEEEE L     OOO  PPPP  EEEEE RRRR   SSS |
  12.          |D   D E     V   V E     L    O   O P   P E     R   R S   S|
  13.          |D   D E     V   V E     L    O   O P   P E     R   R S    |
  14.          |D   D EEEE  V   V EEEE  L    O   O PPPP  EEEE  RRRR   SSS |
  15.          |D   D E     V   V E     L    O   O P     E     R   R     S|
  16.          |D   D E      V V  E     L    O   O P     E     R   R S   S|
  17.          |DDDD  EEEEE   V   EEEEE LLLL  OOO  P     EEEEE R   R  SSS |
  18.          |                                                          |
  19.          ------------------------------------------------------------
  20.          Question and Answer Bulletin                   February 1986
  21.          Copyright (C) 1986 by Atari Corp.      "all rights reserved"
  22.          1196 Borregas Ave.,          Sunnyvale, Ca.            94086
  23.          ------------------------------------------------------------
  24.  
  25.          Here  are  the  latest  questions  from  the Atari developers
  26.          mailbag  as  answered  by  John Feagans, Director of Software
  27.          Technology.  Leave questions on Compuserve for PIN 70007,1072
  28.          or GO PCS57 for Atari developer SIG information.
  29.  
  30.          How  can I have a different background color for text.  There
  31.          does not seem to be anything I can set to make this happen.
  32.  
  33.          A  way  we recommend to make this happen is to do a rectangle
  34.          fill  of  the  area  behind  the text then use v_gtext with a
  35.          transparent writing mode.
  36.  
  37.          I  have  a GEM application that I am porting from the IBM PC.
  38.          Everything  compiles  O.K.  but  I  get a number of undefined
  39.          symbols  in  the  link  step.   Some  of  these  symbols  are
  40.          dos_free, dos_gdrive, dos_lseek, and dos_open.
  41.  
  42.          The problem here is some differences in name between what you
  43.          are  using, what is described in the GEMDOS spec, and what is
  44.          actually  in the bindings.  Here is a table which may explain
  45.          what is happening:
  46.  
  47.                  ---------------------------------------------
  48.                  |Your code      GEM DOS manual      osbind.h|
  49.                  |-------------------------------------------|
  50.                  |dos_free       d_free              Dfree   |
  51.                  |dos_gdrive     d_getdrv            Dgetdrv |
  52.                  |dos_lseek      f_seek              Fseek   |
  53.                  |dos_open       d_open              Fopen   |
  54.                  ---------------------------------------------
  55.  
  56.  
  57.  
  58.          ____________________________________________________________
  59.          ATARI ST DEVELOPERS          -1-               February 1986
  60.  
  61.  
  62.  
  63.          Question and Answer Bulletin
  64.          ____________________________________________________________
  65.  
  66.  
  67.          From  the  VDI there doesn't seem to be a call to set pixels.
  68.          How do I do it and be compatible with all resolutions?
  69.  
  70.          You can do it by drawing a 1 pixel wide line with a length of
  71.          1  pixel.   There  is also a line-A call for setting pixels.
  72.          The latter method is much faster, however, it does not clip.
  73.  
  74.          I  just installed my ROMs and the system doesn't come up.  It
  75.          is  just a white screen.  It is like this every time I reset.
  76.          Oh...there it is...what happened?
  77.  
  78.  
  79.  
  80.          If  you  have just installed your ROMs and do not have a disk
  81.          drive  attached,  the TOS is going to spend considerable time
  82.          attempting  to  read some files from disk.  It is looking for
  83.          desk accessories, an auto folder which may contain drivers to
  84.          load,  and a desktop.inf file created if you saved a desktop.
  85.          If you want to shorten the power-up process, then have a disk
  86.          attached with a valid floppy disk in the drive.
  87.  
  88.          I  just  ported my IBM PC version and have the symbol UMULDIV
  89.          undefined.
  90.  
  91.          VDIBIND  defines  MUL_DIV,  mul_div,  and  umul_div,  but the
  92.          symbol  UMUL_DIV  is  missing.   If  you are programming in C
  93.          perhaps you could #define it in a header file.  In assembler,
  94.          you could equate UMUL_DIV to umul_div.
  95.  
  96.          Can I boot another operating system if I have TOS in ROM?
  97.  
  98.          Yes.  The system has been designed so that a disk with a boot
  99.          sector  can have another operating system which can be loaded
  100.          in.   Another  way  to  load another system would be to put a
  101.          driver  in  the  auto  folder  on  the  system disk.  A third
  102.          interesting  method  would  be to make a desk accessory which
  103.          loads  the  new system.  It is also possible for a program to
  104.          perform  an  extended  bios  call  PUNTAES which frees up the
  105.          memory  used  by  the  AES  and  desktop while preserving the
  106.          bios,dos, and VDI.
  107.  
  108.  
  109.          How  can I load in code from BASIC?  Where is it put?  How do
  110.          I allocate space for it?
  111.  
  112.          To  use  the  BLOAD function you must first allocate a string
  113.          array  big  enough  to  hold  your code.  Next use the varptr
  114.  
  115.          function  to  get the address of the storage area.  Use BLOAD
  116.          with this address and the CALL function to execute your code.
  117.          One  final  point--make  sure  the  code  is  relocatable and
  118.          completely relative as BLOAD does no fix-ups.
  119.  
  120.          How  are the icon outlines dragged on the desktop and what is
  121.          the shape?  
  122.  
  123.          Icons  are  dragged  on  the desktop by moving a polyline XOR
  124.          box.  The vertices are a fixed set that resemble the edges of
  125.          the mask data for the icon.
  126.  
  127.  
  128.          ____________________________________________________________
  129.          ATARI ST DEVELOPERS          -2-               February 1986
  130.  
  131.  
  132.  
  133.          Question and Answer Bulletin
  134.          ____________________________________________________________
  135.  
  136.  
  137.  
  138.          How  do  I  stop  BASIC  from  drawing  windows  on my output
  139.          screen?
  140.  
  141.          Windows  are  redrawn when BASIC calls a routine in the event
  142.          library.   Some  examples  of  these routines are evnt_multi,
  143.          evnt_keyboard,  and  evnt_button.  It is possible to stop the
  144.          evnt_multi calls because there is a BASIC system table called
  145.          SYSTAB.   Check  the  documentation  for  particulars.  At an
  146.          offset  of +24 there is a variable called GEMFLAG.  A POKE of
  147.          1  in  this  location  turns the event calls off and a POKE 0
  148.          turns the event calls on.
  149.  
  150.          When  I  double  click  on  AS68 from the desktop, the screen
  151.          turns white and immediately returns to the desktop.  How do I
  152.          type in the name of the file to assemble?
  153.  
  154.          It is posible to run AS68 from the desktop.  The procedure is
  155.          to  install it as a TTP type, (TOS takes parameters) and save
  156.          desktop, or show-info and rename it as a .TTP.  Next time you
  157.          double  click  on AS68, a dialog box for parameters will come
  158.          up.   You  can  then type "-u -l myfile.s" and click on OK to
  159.          run  the program.  Object files fill be generated and control
  160.          returns to the desktop upon completion of the assembly.
  161.  
  162.          I  have  a program where I am drawing my own dialog boxes and
  163.          menu  by  constructing the object tree and calling OBJC_DRAW.
  164.          The problem is that when I draw the dialog box, the menu pops
  165.          down.   I  have  tried  everything  to prevent this.  What is
  166.          happening?
  167.  
  168.          We  suspect what is happening here is that you may be passing
  169.          the  address  of the menu rather than the dialog box.  If you
  170.          have  the  level  set  to  MAXDEPTH, everything including the
  171.          dialog  box  over  a  popped  down menu may be drawn.  Double
  172.          check what you are passing to the objc_draw.
  173.  
  174.          I  have  a  dialog box with an editable field.  When I try to
  175.          put  string  to initialize the data, everything is messed up.
  176.          It  seems  like  the pe_text pointer is pointing to the wrong
  177.          place!
  178.  
  179.          The  OBSPEC  field of the editable object points to a TEDINFO
  180.          structure.   In  this structure there are three pointers:  in
  181.          order  they are 1) to a string containing the actual text, 2)
  182.          to  the  template,  and  3) to a character validation field.
  183.          Beyond  getting  the  proper pointer, another problem you may
  184.          encounter  is  that the string is a fixed length.  You may be
  185.          moving  data  into it which is longer than was created at the
  186.          time you defined the text in the resource construction set.
  187.  
  188.          I  am  running  the  batch  program and get a bus error after
  189.          c0.prg  has been running a little while compiling my program.
  190.          Could this be a bug in the compiler.
  191.  
  192.  
  193.  
  194.  
  195.  
  196.          ____________________________________________________________
  197.          ATARI ST DEVELOPERS          -3-               February 1986
  198.  
  199.  
  200.  
  201.          Question and Answer Bulletin
  202.          ____________________________________________________________
  203.  
  204.  
  205.          A  bug  is always possible but here are a few other things to
  206.          suspect  when  a problem like this occurs.  The batch program
  207.          will  abend  if  it cannot find a specified program to load.
  208.          You  may  also  have an include file with something illegal.
  209.          That   might   explain   why   things   proceed  through  the
  210.          pre-processor  in  abort  in the first compile step.  Another
  211.          thing to check is if you are running out of space on the disk
  212.          from which the compiler is running.  Each step of the compile
  213.          creates  some intermediate  files which require space.  It is
  214.          possible  to  specify to the compiler which drive to which it
  215.          writes the intermediate files.
  216.  
  217.          I  am  transferring  files  from  my  IBM  PC to the ST using
  218.          kermit.   ASCII  files  come  over  o.k. but binary files are
  219.          messed up.
  220.  
  221.          When  you  transfer  binary files you must tell the server to
  222.          SET FILE TYPE BIN.  You must also tell kermit on the ST to gi
  223.          (get image) or si (send image).
  224.  
  225.          I am using ICED.PRG to design my icons for use in my resource
  226.          file.  How do I load these icons into the RCS?
  227.  
  228.          As  an  example,  let us consider that you are in the RCS and
  229.          have created a dialog box.  Drag the icon type from the parts
  230.          box into your work area.  Select the work area and select the
  231.          icon you have just moved down.  Bring down the menu under the
  232.          file  heading  and  select  the open.  At this point the open
  233.          item  will  not load a new resource but will load in and link
  234.          the data for the icon file you select in the file selector.
  235.  
  236.          What   documentation   errors   do  you  know  about  in  the
  237.          Hitchhiker's Guide to the BIOS?
  238.  
  239.          The current Hitchhiker's Guide shows the initial PC being set
  240.          from  $FC0000  and the initial SP from $FC0004.  These values
  241.          are reversed.
  242.  
  243.          Hitchhiker's  Guide  is  wrong in two places about the GEMDOS
  244.          call $20 to set supervisor mode.  The flag to merely test the
  245.          current  mode  is  $1  and  not the $FFFFFFFF specified.  The
  246.          latter  will  crash  the  system.  Second, the returned value
  247.          from this function is $0 for user mode and $FF for supervisor
  248.          mode, not $0 and $1 as documented.
  249.  
  250.          To  get  started  writing my program I need some more example
  251.          programs.  Where can I find some?
  252.  
  253.          We  recommend that you get onto Compuserve and take a look at
  254.          the Atari 16-bit SIG and also the Atari developer's SIG.  For
  255.          the   latter,   type   GO  PCS57,  and  read  the  membership
  256.          information.   We  are  constantly uploading example programs
  257.          into  the  data libraries as well as other developers.  These
  258.          programs are available for download to your system.
  259.  
  260.  
  261.  
  262.          ____________________________________________________________
  263.          ATARI ST DEVELOPERS          -4-               February 1986
  264.  
  265.  
  266.  
  267.          Question and Answer Bulletin
  268.          ____________________________________________________________
  269.  
  270.  
  271.          I  am  trying to redirect standard output by using the Fforce
  272.          function.   Gemdos  is  checking the handle for a number less
  273.          than  6  and  reporting  an  error.   How  do  I redirect the
  274.          console?
  275.  
  276.          The  new  handle which you pass this function must be greater
  277.          than  6  or  less than 0.  Values of -1, -2, -3 correspond to
  278.          CON, AUX and PRN.
  279.  
  280.          How can I make a listing of my assembler program?
  281.  
  282.          There is a way to make AS68 write a listing file to disk.  To
  283.          do  this you must add the parameter -P and specify the output
  284.          file name following the input file name with >filename.  Here
  285.          is an example which may work for you.
  286.  
  287.              AS68 -P -L -U file.s >list.txt
  288.  
  289.          You  can  do this either from a batch file or you may install
  290.          AS68 as a TTP and do this from the desktop.
  291.  
  292.          I am trying to compile the simple example C program that just
  293.          uses   printf  to  output  "hello  world".   I  keep  getting
  294.          undefined  symbols during the compile and the object will not
  295.          link.  What is wrong?
  296.  
  297.          The  most  likely cause of the compile errors is that you are
  298.          missing  the  header  file  STDIO.H.   Be  sure  that  at the
  299.          beginning  of  your  source  file  that you put the following
  300.          statement in:
  301.  
  302.              #include  "stdio.h"
  303.  
  304.          Problems  with  the  link may be caused by not specifying all
  305.          the  files  that  are  required,  or placing the files in the
  306.          correct  order.  Here is the bare minimum you should have for
  307.          a C program that is not a GEM application:
  308.  
  309.              gemstart.o,(your object),gemlib,libf
  310.  
  311.          Why is the return key not returned by the getchar function?
  312.  
  313.          When  Digital  Research  wrote the 68k run time libraries for
  314.          the  Alcyon C compiler they used the Unix new line definition
  315.          for  terminating  input.   In a generic system the return key
  316.          would  generate  the  sequence CR LF.  The run time libraries
  317.          throw  away  the  CR and count on the LF coming through.  The
  318.          only  way to get around this problem is to use the unfiltered
  319.          bios  or  dos  input  from  console.   The  scanf function is
  320.          similarly   afflicted.    Instead  of  forcing  the  user  to
  321.          terminate  input with control-J, build a buffer of characters
  322.          terminated by a null character using the bios and bdos.  Pass
  323.          this  string to sscanf which acts only on the string and does
  324.          no keyboard input.
  325.  
  326.  
  327.  
  328.          ____________________________________________________________
  329.          ATARI ST DEVELOPERS          -5-               February 1986
  330.  
  331.  
  332.  
  333. ə